<include file="Public:header" />


<style>
body{ background: #f1f1f1;}
.panel-heading {
   padding: 3px 15px;
}

#select{
  margin-right: 5px;
  margin-top: 3px;
}

.list-group {
	margin-bottom: 5px;
}
.pages {
	text-align: center;
}
a{color:#333;}
.panel{background:#fff;}
.headernav a{font-size:1.5em; color:#000;}
.media{padding-left:5px; padding-bottom:10px;}
	

  .container .page-header h1{
    font-size: 2em;
    padding-left: 15px;
  }
  .container .page-header h1 a{
    color: white;
  }

  .list-group .list-group-item .name{
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 0.3em;
  }
  .list-group .list-group-item p{
    margin-bottom: 5px;
    font-size: 1.0em;
  }
  .optionbtn{position:absolute; top:0; bottom:0; width:80px; line-height:85px; text-align:center; vertical-align:middle; color:#fff;}
  .optionbtn.s{right:160px; background:#479C4B;}
  .optionbtn.e{right:80px; background:#4CA5B0;}
  .optionbtn.d{right:0px; background:#C75658;}
  .optionbox{position:absolute; right:-240px; top:0; bottom:0;}
  
</style>
<div class="container">




  <div class="list-group" style="margin:0; margin-top:4px;">
    <volist name="list" id="addr">
        <div style="border-radius:0; border-left:none; overflow:hidden; border-right:none;" href="" class="list-group-item">
          <p class="name">{$addr['yourname']}，{$addr['tel']}</p>
          <p>{$addr['address']} </p>
          <div class="optionbox">
          <a href="{:U('edit',array('id'=>$addr['id']))}" class="optionbtn e">修改</a>
          <a onClick="return confirm('您确认要删除吗？');" href="{:U('delete',array('id'=>$addr['id']))}" class="optionbtn d">删除</a></div>
        </div>
    </volist>
  </div>

</div><br>



 <script>
     
	 $('.optionbox').each(function(index, element) {
        $(this).parent().click(function(e) {
			
			if($(element).css('right').replace('px', '')*1 == 0){
				$(element).animate({right:-300},50);
			}else{
				$(element).animate({right:0},50);
			}
        });
    });
 </script>



<a href="{:U('add')}" class="btn btn-success" style="margin:0 auto; width:90%; display:block;">添加新地址</a>
<include file="Public:footer" />
